<div class="row-fluid" style="margin-bottom: 10px;">
    <div class="span12">
        <div class="box">
            <div class="tab-header">
                <i class="icon-file" style="margin-left: 10px;"></i><?= lang('label_view') ?></div>

            <div class="padded" id="action_load_mudle">
                <!-- action contant  -->
                <h4><?php
                    $title = unserialize($result->title);
                    echo (isset($title['ar'])) ? $title['ar'] : $title['en'];
                    ?></h4>

                <? echo $result->create_date; ?>

                <ul id="listview">
                    <?php if ($result->additional) { ?>
                    <li><strong><?= lang('label_cat_additional') ?></strong></li>
                        <?php if ($additionals) { ?>
                            <?php foreach ($additionals as $addit) { ?>
                                <li><?php
                                    $title = unserialize($addit->title);
                                    echo '<strong>'.lang('label_name').'</strong>';
                                    foreach ($title as $key => $value) {
                                        echo '<br /> ' . lang("label_$key") . ': ' . $value;
                                    }
                                    ?>
                                    <?= '<br /><strong>' . lang('label_additional_type') . ':</strong> ' . lang('label_input_' . $addit->type) ?>
                                    <br />
                                    <?php
                                    if (in_array($addit->type, array('checkbox', 'list'))) {
                                        echo '<strong>'.lang('label_additional_items') . '</strong><br />';
                                        $data = unserialize($addit->data);
                                        if (count($data) > 1) {
                                            $i = 0;
                                            foreach ($data as $key => $value) {
                                                $dt[$i++] = explode('|', $value);
                                            }
                                            $d = 0;
                                            for ($z = $i - 1; $z >= 0; $z--) {
                                                if (count($dt[$z]) > $d)
                                                    $d = count($dt[$z]);
                                            }
                                            for ($f = 0; $f < $d; $f++) {
                                                $first = TRUE;
                                                for ($z = 0; $z < $i; $z++) {
                                                    if ($first) {
                                                        $first = false;
                                                        echo $dt[$z][$f];
                                                    } else {
                                                        echo ' => ' . $dt[$z][$f];
                                                    }
                                                }
                                                echo '<br />';
                                            }
                                        }
                                    }
                                    ?>
                                </li>
                            <?php } ?>
                        <?php } ?>
                    <?php } ?>
                </ul>

                <div class="tool">
                    <a class="btn btn-primary" href="<?= base_url() . ADMIN_FOLDER . '/' . get_segment(2) ?>/edit/<?= $result->id ?>" style="margin-left:20px;"><i class=" icon-edit" ></i>&nbsp;&nbsp;&nbsp;<?= lang('label_edit') ?></a>
                    <a class="delete_confirm btn btn-danger" href="<?= base_url() . ADMIN_FOLDER . '/' . get_segment(2) ?>/delete/<?= $result->id ?>"><i class="icon-trash"></i>&nbsp;&nbsp;&nbsp;<?= lang('label_delete') ?></a>
                </div>

            </div>
        </div>
    </div>
</div>
